Page({
  data: {},
  onLoad() {
    this.updateRight();
  },

  updateRight() {
    const that = this;
    const query = wx.createSelectorQuery().in(this);
    query
      .select(".right")
      .boundingClientRect(function (res) {
        that._slideWidth = res.width;
        that._slideHeight = res.height;
        that.setData({
          viewWidth: that._slideWidth,
        });
      })
      .exec();
  },
  displayData() {
    console.log(this.data.viewWidth);
    console.log(this._slideHeight);
  },
});
